A call to Collection.toArray can use the Collection's size vs an empty Array of the desired type.
